package com.appkubes.portal.admin.application.auth.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.keycloak.representations.idm.UserRepresentation;

import javax.ws.rs.core.Response;

public interface KeyCloakUserService {


    // 根据 username 查找用户
    UserRepresentation getUserRepresentation(String username);

    // 根据 username 查找用户
    UserRepresentation getUserRepresentationById(String userId);


    IPage<UserRepresentation> getPages(Integer pageNo, Integer pageSize);

    /**
     * 创建用户
     *
     * @param username
     * @param password
     * @return
     */
    UserRepresentation createUser(String username, String password);


    Response deleteUser(String username);

    Response deleteById(String userId);

    //重置密码
    Boolean resetPassword(String userId, String password);

    //设置用户是否启用状态
    void setEnable(String userId, Boolean enabled);
}
